<template>
  <el-container class="home">
    <el-header>
      <div class="header-title">智能化改造数字化转型综合服务平台</div>
      <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
        background-color="#1c84c6"
        text-color="#fff"
        active-text-color="#ffd04b">
        <el-menu-item index="1">首&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页</el-menu-item>
        <el-menu-item index="2">企业自评</el-menu-item>
        <el-menu-item index="3">信息查询</el-menu-item>
        <el-menu-item index="4" disabled>消息中心</el-menu-item>
        <el-menu-item index="5">专家查询</el-menu-item>
      </el-menu>
    </el-header>
    <el-main class="home-main">
      <indexInfo v-if="activeIndex == '1'"></indexInfo>
      <expertInfo v-if="activeIndex == '5'"></expertInfo>
    </el-main>
  </el-container>
</template>
<script>
import indexInfo from "./indexInfo";
import expertInfo from "./expertInfo";

export default {
  components: {indexInfo, expertInfo},
  data() {
    return {
      activeIndex: '1',
      like: true,
      value1: 4154.564,
      value2: 1314,
      title: "增长企业数",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      this.activeIndex = key;
      console.log(key, keyPath);
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss">
.home {
  width: 100%;
  height: 100%;
  background-color: #FFFFFF;
  overflow: hidden;

  .el-header {
    display: flex;
    align-items: center;
    height: 60px;
    width: 100%;
    background-color: #1c84c6;
  }

  .header-title {
    font-weight: bold;
    color: #FFFFFF;
    font-size: 20px;
    margin: 0px 20px;
  }
}

.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  background-color: #d3dce6;
}

.like {
  cursor: pointer;
  font-size: 25px;
  display: inline-block;
}

.el-menu--horizontal > .el-menu-item {
  border-bottom: none;
}

.el-menu--horizontal > .el-menu-item.is-active {
  background-color: rgb(22, 106, 158) !important;
  border-bottom: none;
}

.home-main {
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
}

</style>
